package _1_3_Collections;

import org.junit.Test;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * Created by bpzj on 6/12/2018.
 */
public class test {

    @Test
    public void arrayList() {
        List<Integer> integers = new ArrayList<>();
        System.out.println(integers);
        // TODO 放到 那个类里， 完善 Arrays.asList 的问题
        List<Integer> integerList = new ArrayList<>(Arrays.asList(0, 1, 2));
        System.out.println(integerList);
        List emptyList = Collections.EMPTY_LIST;

    }
    @Test
    public void collectionInterface() {
        /**
         *  返回的类型为  Collections.EmptyList {@link Collections.EmptyList}
         *  是一个 private 类
         */
        List emptyList = Collections.emptyList();

    }
}
